Communication apparatus

ABSTRACT

A communication apparatus may perform: receiving a specific signal from a first external apparatus via a second interface; changing a state of a first interface from a first state to a second state, in a case where the specific signal including predetermined information is received via the second interface while the state of the first interface is the first state; maintaining the state of the first interface in the first state, in a case where the specific signal not including the predetermined information is received while the state of the first interface is the first state; and performing a communication of target data with the first external apparatus via the first interface being in the second state, after the state of the first interface has been changed to the second state.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. Ser. No.15/080,765 filed Mar. 25, 2016 and claims priority to Japanese PatentApplication No. 2015-66066, filed on Mar. 27, 2015, the entire contentsof each of which are hereby incorporated by reference into the presentapplication.

TECHNICAL FIELD

The technology disclosed herein relates to a communication apparatus forperforming the communication of target data with an external apparatus.

DESCRIPTION OF RELATED ART

A reader is known that turns ON the power source of a controller and aRF (abbreviation of Radio Frequency) transmission-reception unit when acard detection unit detects an IC (abbreviation of Integrated Circuit)card. The reader can perform a communication with the IC card in thecase where the power source of the controller and the RFtransmission-reception unit has been turned ON.

SUMMARY

In the above technology, both of the controller and the RFtransmission-reception unit are turned ON when the card detection unitdetects an IC card regardless of the status of the IC card. The presentspecification discloses a technology that enables a communicationapparatus to realize power saving by setting an interface to anappropriate state in accordance with the condition of an externalapparatus.

A communication apparatus may comprise: a first interface configured toperform a wireless communication in accordance with a firstcommunication scheme, and to be set in one state among a plurality ofstates including a first state and a second state that has higher powerconsumption than that of the first state; a second interface configuredto perform a wireless communication in accordance with a secondcommunication scheme different from the first communication scheme, thesecond interface having lower power consumption than that of the firstinterface being in the second state; a processor; and a memory storingcomputer-readable instructions therein, the computer-readableinstructions, when executed by the processor, causing the communicationapparatus to perform: receiving a specific signal via the secondinterface from a first external apparatus; changing a state of the firstinterface from the first state to the second state, in a case where thespecific signal including predetermined information is received via thesecond interface while the state of the first interface is the firststate; maintaining the state of the first interface in the first state,in a case where the specific signal not including the predeterminedinformation is received while the state of the first interface is thefirst state; and performing a communication of target data with thefirst external apparatus via the first interface being in the secondstate, after the state of the first interface has been changed to thesecond state.

A control method and computer-readable instructions for implementationof the communication apparatus, and a non-transitory computer-readablerecording medium in which the computer-readable instructions are stored,are also novel and useful. Further, a communication system comprisingthe above communication apparatus and an external apparatus (e.g. firstexternal apparatus, second external apparatus, etc.) is also novel anduseful.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows a configuration of a communication system;

FIG. 2 schematically shows a basic process executed by a controller ofan MFP;

FIG. 3 shows a flowchart of an interface controlling process executed bythe controller of the MFP of a first embodiment;

FIG. 4 shows a continuation of the flowchart of FIG. 3;

FIG. 5 shows a flowchart of a list administration process executed bythe controller of the MFP;

FIG. 6 shows a table representing, for each condition, a content of aflag included in device information in the first embodiment and a secondembodiment;

FIG. 7 shows a sequence chart of one example of a process executed bythe communication system of the first embodiment;

FIG. 8 is a continuation of the sequence chart of FIG. 7;

FIG. 9 shows a flowchart of an interface controlling process by thecontroller of the MFP in the second embodiment;

FIG. 10 shows a continuation of the flowchart of FIG. 9;

FIG. 11 shows a sequence chart of one example of a process executed bythe communication system of the second embodiment; and

FIG. 12 shows a continuation of the sequence chart of FIG. 11.

EMBODIMENT First Embodiment

(Configuration of Communication System 2; FIG. 1)

As shown in FIG. 1, a communication system 2 comprises a MFP(abbreviation of multi-function peripheral) 10, a plurality of portableterminals 50, 90, and 100, and an AP (abbreviation of access point) 110.In FIG. 1, the MFP 10 and the portable terminals 50, 90, and 100 canperform a wireless communication with one another either via the AP 110or not via the AP 110.

(Configuration of MFP 10)

The MFP 10 is a peripheral apparatus that is capable of performingvarious functions such as printing, scanning etc., that is, MFP 10 isthe peripheral apparatus of the portable terminal 50 etc. The MFP 10comprises an operation unit 12, a display unit 14, a print performingunit 16, a scan performing unit 18, a Wi-Fi interface 20, a BT(abbreviation of Bluetooth (registered trademark)) interface 22, an NFC(abbreviation of Near Field Communication) interface 24, and acontroller 30. The units 12 to 30 are connected to a bus line (referencesign omitted). Hereinbelow, interface will be referred to as “I/F”.

The operation unit 12 comprises a plurality of keys. A user can inputvarious instructions into the MFP 10 by operating the operation unit 12.The display unit 14 is a display for displaying various types ofinformation. The display unit 14 also functions as a so-called touchpanel (i.e. also functions as an operation unit). The print performingunit 16 is a printing mechanism such as an inkjet system or lasersystem. The scan performing unit 18 is a scanning mechanism such as aCCD (abbreviation of Charge Coupled Device) or a CIS (abbreviation ofContact Image Sensor).

The Wi-Fi I/F 20 is an I/F for performing a wireless communicationaccording to a Wi-Fi scheme (hereinafter called “Wi-Fi communication”).The Wi-Fi scheme, for example, is a wireless communication scheme basedon IEEE (abbreviation of the Institute of Electrical and ElectronicsEngineers, Inc.) standard 802.11, and standards conforming thereto (e.g.802.11a, 11b, 11g, 11n, etc.). More specifically, the Wi-Fi I/F 20supports a WFD (abbreviation of Wi-Fi Direct (registered trademark))scheme formulated by a Wi-Fi Alliance. The WFD scheme is a wirelesscommunication scheme described in “Wi-Fi Peer-to-Peer (P2P) TechnicalSpecification Version 1.1” prepared by the Wi-Fi Alliance.

The Wi-Fi I/F 20 is set to any one of an OFF state, a Standby state, andan ON state. The OFF state of the Wi-Fi I/F 20 is a state in which poweris not being supplied to the Wi-Fi I/F 20, that is, the state in which aWi-Fi communication cannot be performed. The Standby state of the Wi-FiI/F 20 is the state in which power is being supplied to the Wi-Fi I/F20, but it is not possible to perform the Wi-Fi communication. TheStandby state of the Wi-Fi I/F 20 can also be described as the state inwhich it is possible to receive a radio wave via the Wi-Fi I/F 20, butwithout being able to ensure sufficient communication speed, it issubstantially not possible to perform the Wi-Fi communication. The ONstate of the Wi-Fi I/F 20 is the state in which sufficient power isbeing supplied to the Wi-Fi I/F 20, and it is possible to perform theWi-Fi communication. An amount of power being supplied to the Wi-Fi I/F20 in the ON state (i.e. power consumption) is greater than the amountof power supplied to the Wi-Fi I/F 20 in the Standby state.

The BT I/F 22 is an I/F for performing a wireless communicationaccording to a Bluetooth scheme (hereinafter called “BT communication”).The Bluetooth scheme, for example, is a wireless communication schemebased on IEEE standard 802.15.1, and standards conforming thereto. Morespecifically, the BT I/F 22 supports BLE (abbreviation of Bluetooth LowEnergy). The BLE is a standard that is realized using version 4.0 or alater version of the Bluetooth scheme. Hereinafter, Bluetooth versionlower than 4.0 will be called “classic BT”. In order for a BTcommunication to be performed according to BLE between a pair of BTI/Fs, one BT I/F may support “Bluetooth Smart Ready” established usingthe BT scheme, and the other BT I/F may support “Bluetooth Smart Ready”or “Bluetooth Smart” established using the BT scheme. A BT I/F thatsupports “Bluetooth Smart Ready” is an I/F that is capable of performingboth a BLE operation and a classic BT operation (i.e. a so-called dualmode I/F). A BT I/F that supports “Bluetooth Smart” is an I/F that iscapable of performing the BLE operation, but is not capable ofperforming the classic BT operation. In the present embodiment, the BTcommunication according to BLE is performed between the MFP 10 and theportable terminals 50, 90, and 100. Then, since the BT I/F (e.g.reference sign 62) of the portable terminals 50, 90, and 100, which willbe explained below, supports “Bluetooth Smart Ready”, the BT I/F 22 ofthe MFP 10 may support either “Bluetooth Smart Ready” or “BluetoothSmart”. However, in a modification, in the case where the BT I/F 22 ofthe MFP 10 supports “Bluetooth Smart Ready”, the BT I/Fs of the portableterminals 50, 90, and 100 may support “Bluetooth Smart”.

Different points between classic BT and BLE will be described. A numberof BLE channels (i.e. 40) is smaller than the number of classic BTchannels (i.e. 79). Current consumption at the time of a BLE datacommunication (e.g. 15 mA) is lower than the current consumption at thetime of a classic BT data communication (e.g. 35 mA). Therefore, BLEpower consumption is lower than classic BT power consumption. Also, anAdvertise signal is used in BLE, but the Advertise signal is not used inclassic BT.

Different points between the Wi-Fi scheme and the BT scheme will bedescribed. A communication speed of the Wi-Fi communication (e.g. amaximum communication speed of 600 Mbps) is faster than thecommunication speed of the BT communication (e.g. a maximumcommunication speed of 24 Mbps). A frequency of a carrier wave in theWi-Fi communication is either a 2.4 GHz band or a 5.0 GHz band. Thefrequency of the carrier wave in the BT communication is the 2.4 GHzband. That is, in the case where the 5.0 GHz band is used as the carrierwave frequency in the Wi-Fi communication, the carrier wave frequency inthe Wi-Fi communication differs from the carrier wave frequency in theBT communication. Furthermore, the maximum distance over which the Wi-Ficommunication can be performed (e.g. approximately 100 m) is greaterthan the maximum distance over which the BT communication can beperformed (e.g. roughly several tens of meters).

The BT I/F 22 is constantly maintained in the ON state while the powersupply to the MFP 10 is ON. (i.e. power is constantly supplied to the BTI/F 22, and the state in which the BT communication is possible ismaintained). The power consumption of the BT I/F 22 in the ON state(i.e. the power consumption of BLE) is lower than the power consumptionof the Wi-Fi I/F 20 in the ON state, and the power consumption of an NFCI/F 24 in the ON state.

The NFC I/F 24 is an I/F for performing a wireless communicationaccording to an NFC scheme (hereinafter called “NFC communication”). TheNFC I/F 24 comprises a memory 26. The NFC scheme is a wirelesscommunication scheme for a so-called near field wireless communication,and, for example, is a wireless communication scheme based oninternational standard ISO/IEC 21481 or 18092. The communication speedof the NFC communication (e.g. a maximum communication speed of 424Kbps) is slower than the communication speed of the BT communication(e.g. a maximum communication speed of 24 Mbps). In the NFCcommunication, the frequency of the carrier wave (e.g. a 13.56 MHz band)differs from that of the Wi-Fi communication (e.g. either the 2.4 GHzband or the 5.0 GHz band) and that of the BT communication (e.g. the 2.4GHz band). Also, the maximum distance over which the NFC communicationcan be performed (e.g. approximately 10 cm) is shorter than the maximumdistance over which the BT communication can be performed (e.g.approximately several tens of meters).

As types of I/Fs for performing the NFC communication, an I/F called anNFC forum device, and an I/F called an NFC forum tag are known. In thepresent embodiment, the NFC I/F 24 functions as an NFC forum device. Ina modification, the NFC I/F 24 may function as the NFC forum tag. TheNFC forum device is an I/F that can selectively operate in any of a P2P(abbreviation of Peer To Peer) mode, a R/W (abbreviation ofReader/Writer) mode, and a CE (abbreviation of Card Emulation) mode. TheNFC forum tag is not an I/F that can selectively operate in any of theaforementioned three modes, but rather is an I/F that functions solelyas an IC (abbreviation of Integrated Circuit) tag. Because the NFC forumtag is not an I/F that can selectively operate in any of theaforementioned three modes, the NFC forum tag has a simplerconfiguration than the NFC forum device. That is, IC chip configurationis simple. In general, an IC chip that functions as the NFC forum tag isless expensive than an IC chip that functions as the NFC forum device.

The NFC I/F 24, similar to the Wi-Fi I/F 20, is also set to any one ofthe OFF state, the Standby state, and the ON state. In the presentembodiment, the Wi-Fi I/F 20 and the NFC I/F 24 are always set to thesame state. The OFF state of the NFC I/F 24 is the state in which poweris not being supplied to the NFC I/F 24, that is, the state in which theNFC communication cannot be performed. The Standby state of the NFC I/F24 is the state in which power is being supplied to the NFC I/F 24, butit is not possible to perform the NFC communication. The Standby stateof the NFC I/F 24 can also be described as the state in which a radiowave can be received via the NFC I/F 24, but without being able toensure sufficient communication speed, it is substantially not possibleto perform the NFC communication. The ON state of the NFC I/F 24 is thestate in which sufficient power is being supplied to the NFC I/F 24, andthe NFC communication is able to be performed. The amount of power beingsupplied to the NFC I/F 24 in the ON state (i.e. power consumption) isgreater than the amount of power supplied to the NFC I/F 24 in theStandby state.

The controller 30 comprises a CPU 32 and a memory 34. The CPU 32executes various processes in accordance with a program 36 stored in thememory 34. The memory 34 is configured with a volatile memory and anonvolatile memory. The memory 34 is configured to store a device name“NM” indicating the MFP 10 in advance. In addition, the memory 34 isconfigured to store a list 40 for managing the device informationrelated to a portable terminal (e.g. portable terminal 50 etc.) that isperforming the BT communication with the MFP 10. The list 40 includesthe device information in which a device name, a flag, and a timer valueare combined. The device name (e.g. “N1”) indicates the device name of aportable terminal (e.g. portable terminal 50). The flag (e.g. “Standby”)is information associated with the portable terminal having the devicename in an I/F controlling process, which will be described below. Theflag is information related to the states of the Wi-Fi I/F 20 and theNFC I/F 24. The timer value (e.g. “T1”) indicates a count value of atimer associated with the device name and the flag. By the CPU 32executing the I/F controlling process described below (refer to FIGS. 3and 4), the device information is added to the list 40. Further, by theCPU 32 executing a list administration process described below (refer toFIG. 5), the device information in the list 40 is maintained, updated,or deleted.

(Configuration of Portable Terminals 50, 90, and 100)

Each of the portable terminals 50, 90, and 100, for example, is aportable terminal device such as a mobile telephone (e.g. a smartphone), a PDA (abbreviation of Personal Digital Assistant), laptop PC(abbreviation of Personal Computer), a tablet PC, a portable musicplayer, and a portable video player. The configuration of the portableterminal 50 will be explained below, but portable terminals 90 and 100basically comprise the same configuration as that of portable terminal50.

The portable terminal 50 comprises an operation unit 52, a display unit54, a Wi-Fi I/F 60, a BT I/F 62, an NFC I/F 64, and a controller 70.Each of the units 52 to 70 is connected to a bus line (reference signomitted).

The operation unit 52 comprises a plurality of keys. A user can inputvarious instructions into the portable terminal 50 by operating theoperation unit 52. The display unit 54 is a display for displayingvarious types of information. The display unit 54 also functions as aso-called touch panel (i.e. also functions as an operation unit). TheWi-Fi I/F 60 is the I/F for performing the Wi-Fi communication. TheWi-Fi I/F 60 may or may not support WFD. The BT I/F 62 is the I/F forperforming the BT communication, and supports BLE. The NFC I/F 64 is theI/F for performing the NFC communication. The differences between therespective I/Fs 60, 62, and 64 are the same as the differences betweenthe respective I/Fs 20, 22, and 24 of the MFP 10.

The controller 70 comprises a CPU 72 and a memory 74. The CPU 72executes various processes in accordance with an OS program 76 stored inthe memory 74. The memory 74 is configured with a volatile memory and anonvolatile memory and the like. The memory 74 is configured to not onlystore the OS program 76, but also an application program 78 for causinga function (e.g. a print function) to be performed on the MFP 10. Theapplication program 78, for example, may be installed in the portableterminal 50 from an Internet server provided by a vendor of the MFP 10,or may be installed in the portable terminal 50 from storage mediashipped together with the MFP 10. The memory 74 is also configured tostore in advance the device name “N1” for identifying the portableterminal 50. Furthermore, the portable terminals 90 and 100 respectivelystores device names “N2” and “N3”.

The memory 74 also has an activation information storing area 80 and aninstruction information storing area 82. The activation informationstoring area 80 is an area for storing activation information indicatingthat the application program 78 has been activated in the case where theaforementioned application 78 program has been activated. The CPU 72causes the activation information to be stored in the activationinformation storing area 80 when the application 78 program isactivated. The instruction information storing area 82 is an area forstoring instruction information indicating that a function performinginstruction (e.g. a print instruction) for causing the MFP 10 to performa function has been inputted. The CPU 72 causes the instructioninformation to be stored in the instruction information storing area 82when the function performing instruction is inputted by the user afteractivation of the application program 78.

(Configuration of AP 110)

The AP 110 is a device for forming a Wi-Fi network. The MFP 10 and theportable terminal 50 etc. can belong to the Wi-Fi network formed by theAP 110 as slaves (specifically, stations). For example, in the casewhere the MFP 10 and the portable terminal 50 belong to the Wi-Finetwork formed by the AP 110, the AP 110 can relay the Wi-Ficommunication between the MFP 10 and the portable terminal 50.

(Basic Process of MFP 10; FIG. 2)

Next, the basic process executed by the CPU 32 of the MFP 10 will beexplained by referring to FIG. 2. When the MFP 10 power supply is ON,the CPU 32 repeatedly performs a broadcast transmission of the Advertisesignal via the BT I/F 22 within a communication range 200 of the BT I/F22 (i.e. the range reached by the radio wave) (S10, S12). The Advertisesignal includes the device name “NM” of the MFP 10. The CPU 32 sends theAdvertise signal to the exterior without establishing a Bluetoothlogical link (i.e. a Bluetooth-scheme wireless connection).

In the example of FIG. 2, the portable terminal 50 exists within a range210 of the communication range 200 of the BT I/F 22 of the MFP 10. Therange 210 is the range that is near the MFP 10. Also, in the portableterminal 50, the application program 78 has been activated, and thefunction performing instruction has already been inputted. That is, theactivation information is stored in the activation information storingarea 80, and the instruction information is stored in the instructioninformation storing area 82 of the memory 74 of the portable terminal50. The CPU 72 of the portable terminal 50 receives the Advertise signal(S10) from the MFP 10 via the BT I/F 62. At this occasion, the CPU 72can measure an intensity of the radio wave when the Advertise signal isreceived. Next, the CPU 72 determines whether or not the distancebetween the portable terminal 50 and the MFP 10 is relatively near, bydetermining whether or not the measured radio wave intensity exceeds apredetermined threshold. In the example of FIG. 2, as describedhereinabove, the portable terminal 50 exists within the range 210 thatis near the MFP 10. Therefore, the value of the radio wave intensitywhen the CPU 72 receives the Advertise signal is higher than thepredetermined threshold. Therefore, the CPU 72 determines that thedistance between the portable terminal 50 and the MFP 10 is relativelynear. In this case, the CPU 72 causes the device name “NM” and adistance information “Near”, indicating that the distance between theportable terminal 50 and the MFP 10 is relatively near to be stored inthe memory 74 in an associated manner. Next, the CPU 72 sends a ScanRequest signal (hereinafter written as “Scan_Req signal”) to the MFP 10via the BT I/F 62. The Scan_Req signal is a unicast signal sent from theportable terminal that received the Advertise signal.

In S12, the CPU 32 of the MFP 10 receives the Scan_Req signal from theportable terminal 50 via the BT I/F 22. In particular, the CPU 32 isable to receive the Scan_Req signal without establishing a logical link.The Scan_Req signal received in S12 includes the device name “N1” of theportable terminal 50 that is the source of the Scan_Req signal, thedistance information “Near” indicating that the distance between theportable terminal 50 and the MFP 10 is relatively near, the activationinformation, the instruction information, and NFC Capabilityinformation. The NFC Capability information is information indicatingthat the portable terminal 50 is able to perform the NFC communication.

Furthermore, in the example of FIG. 2, the portable terminal 90 existswithin the communication range 200 of the BT I/F 22 of the MFP 10, butexists within a range that is far from the MFP 10 (i.e. outside of therange 210). Also, although the application program 78 has been activatedin the portable terminal 90, the function performing instruction has notbeen inputted yet. That is, the activation information has been storedin the memory (not shown in the drawing) of the portable terminal 90,but the instruction information has not been stored. Similar to the caseof the portable terminal 50, the portable terminal 90 receives theAdvertise signal (S20) from the MFP 10. In this occasion, the value ofthe radio wave intensity when the portable terminal 90 receives theAdvertise signal is lower than the predetermined threshold. Therefore,the portable terminal 90 determines that the distance between theportable terminal 90 and the MFP 10 is relatively far. The portableterminal 90 associates the device name “NM” and the distance information“Far” indicating that the distance between the portable terminal 90 andthe MFP 10 is relatively far, and causes the same to be stored in thememory (not shown in the drawing) of the portable terminal 90. Next, theportable terminal 90 sends the Scan-Req signal to the MFP 10.

In S22, the CPU 32 of the MFP 10 receives the Scan_Req signal from theportable terminal 90 via the BT I/F 22. The Scan_Req signal received inS22 includes the device name “N2” of the portable terminal 90, thedistance information “Far”, the activation information, and the NFCCapability information. As described hereinabove, the Scan_Req signal ofS22 does not include the instruction information because the functionperforming instruction has not been inputted in the portable terminal90.

In the example of FIG. 2, the portable terminal 100 exists outside thecommunication range 200 of the BT I/F 22 of the MFP 10. The portableterminal 100 is thus not able to receive the Advertise signal from theMFP 10. Therefore, the CPU 32 of the MFP 10 does not receive theScan_Req signal from the portable terminal 100.

The CPU 32 repeatedly executes the aforementioned processes while thepower supply to the MFP 10 is ON.

(I/F Controlling Process of MFP 10; FIGS. 3 and 4)

Next, the I/F controlling process executed by the CPU 32 of the MFP 10will be explained by referring to FIGS. 3 and 4. The CPU 32 starts theprocess of FIGS. 3 and 4 when the power supply to the MFP 10 is turnedON. However, the CPU 32 does not execute the process of FIGS. 3 and 4 inthe case where a Wi-Fi connection has already been established betweenthe MFP 10 and the AP 110 (refer to FIG. 1) (i.e. the case where the MFP10 already belongs as a station to the Wi-Fi network formed by the AP110). The CPU 32 maintains the Wi-Fi I/F 20 and the NFC I/F 24 in the ONstate while the Wi-Fi connection is established between the MFP 10 andthe AP 110.

In S50, the CPU 32 determines whether or not the Scan_Req signal hasbeen received from any of the portable terminals (e.g. portable terminal50). As described above, the portable terminal that exists within thecommunication range 200 of the BT I/F 22 of the MFP 10 (see FIG. 2)sends the Scan_Req signal to the MFP 10 in response to receiving theAdvertise signal from the MFP 10. In this case, the CPU 32 receives theScan_Req signal from the portable terminal via the BT I/F 22. The CPU32, upon receiving the Scan_Req signal, makes a determination of YES inS50, and proceeds to S51. On the other hand, in the case where theScan_Req signal is not received, the CPU 32 makes a determination of NOin S50, and proceeds to S56.

In S51, the CPU 32 determines whether or not the received Scan_Reqsignal includes the NFC Capability information. When the portableterminal that is the source of the Scan_Req signal is able to performthe NFC communication, the Scan_Req signal includes the NFC Capabilityinformation (refer to FIG. 2). When the portable terminal that is thesource of the Scan_Req signal is not able to perform the NFCcommunication, the Scan_Req signal does not include the NFC Capabilityinformation. In the case where the received Scan_Req signal includes theNFC Capability information, the CPU 32 makes the determination of YES inS51, and proceeds to S52. On the other hand, in the case where thereceived Scan_Req signal does not include the NFC Capabilityinformation, the CPU 32 makes the determination of NO in S51, andreturns to S50.

In S52, the CPU 32 determines whether or not the received Scan_Reqsignal includes the activation information. In the case where anapplication program (e.g. the application program 78) is activated onthe portable terminal that is the source of the Scan_Req signal, theScan_Req signal includes the activation information (refer to FIG. 2).In the case where the application program has not been activated on theportable terminal that is the source of the Scan_Req signal, theScan_Req signal does not include the activation information. In the casewhere the received Scan_Req signal includes the activation information,the CPU 32 makes the determination of YES in S52, and proceeds to S70 ofFIG. 4. On the other hand, in the case where the received Scan_Reqsignal does not include the start information, the CPU 32 makes thedetermination of NO in S52, and proceeds to S54.

In S54, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S54 includes the device nameincluded in the received Scan_Req signal, the flag “OFF”, and the timervalue (e.g. “T1” of FIG. 1). When the content of the flag is other than“OFF” in the case where device information that includes the same devicename as the device name already included in the Scan_Req signal at thestage of S54 exists in the list 40, the CPU 32 changes the content ofthe flag to “OFF” (i.e. updates the device information). On the otherhand, when the content of the flag is “OFF”, the CPU 32 maintains thecontent of the flag as “OFF” (i.e. maintains the device information). InS54, in the case where the CPU 32 has caused the device informationincluding the device name included in the Scan_Req signal to be storedanew in the list 40, the CPU 32 starts the count of the timer value(e.g. “T1” of FIG. 1) included in the device information. When S54 ends,the process proceeds to S56.

In S56, the CPU 32 determines whether or not the Wi-Fi I/F 20 and theNFC I/F 24 are both in either the ON state or the Standby state. In thecase where the Wi-Fi I/F 20 and the NFC I/F 24 are in either the ONstate or the Standby state, the CPU 32 makes the determination of YES inS56, and proceeds to S58. On the other hand, in the case where the Wi-FiI/F 20 and the NFC I/F 24 are both in the OFF state, the CPU 32 makesthe determination of NO in S56, and returns to S50.

In S58, the CPU 32 determines whether or not device information thatincludes either the “ON” or “Standby” flag exists in the list 40. In thecase where even one piece of device information associated with eitherthe “ON” or “Standby” flag exists in the list 40, the CPU 32 makes thedetermination of YES in S58, and returns to S50. On the other hand, inthe case where only device information that is associated with the “OFF”flag exists in the list 40, or the case where no device informationexists in the list 40, the CPU 32 makes the determination of NO in S58,and proceeds to S60.

In S60, the CPU 32 changes the Wi-Fi I/F 20 and the NFC I/F 24 from theON state (or the Standby state) to the OFF state. Specifically, the CPU32 stops the supply of power to the Wi-Fi I/F 20 and the NFC I/F 24.When S60 ends, the process returns to S50.

In S70 of FIG. 4, the CPU 32 determines whether or not the Scan_Reqsignal received in the case of YES in S50 of FIG. 3 includes theinstruction information. In the case where the function performinginstruction (e.g. the print function) has been inputted to the portableterminal that is the source of the Scan_Req signal, the Scan_Req signalincludes the instruction information (refer to FIG. 2). In the casewhere the function performing instruction has not been inputted to theportable terminal that is the source of the Scan_Req signal, theScan_Req signal does not include the instruction information (refer toFIG. 2). In the case where the Scan_Req signal includes the instructioninformation, the CPU 32 makes the determination of YES in S70, andproceeds to S72. On the other hand, in the case where the Scan_Reqsignal does not include the instruction information, the CPU 32 makesthe determination of NO in S70, and proceeds to S80.

In S72, the CPU 32 determines whether or not the received Scan_Reqsignal includes the distance information “Near”. In the case where theportable terminal that is the source of the Scan_Req signal existsrelatively near the MFP 10, the Scan_Req signal includes the distanceinformation “Near” (refer to FIG. 2). In the case where the portableterminal that is the source of the Scan_Req signal exists relatively farfrom the MFP 10, the Scan_Req signal includes the distance information“Far” (refer to FIG. 2). In the case where the Scan_Req signal includesthe distance information “Near”, the CPU 32 makes the determination ofYES in S72, and proceeds to S74. On the other hand, in the case wherethe Scan_Req signal includes the distance information “Far”, the CPU 32makes the determination of NO in S72, and proceeds to S82.

In S74, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S74 includes the device nameincluded in the received Scan_Req signal, the “ON” flag, and the timervalue. Furthermore, at the stage of S74, when the content of the flag isother than “ON” in the case where device information including the samedevice name as the device name included in the Scan_Req signal alreadyexists in the list 40, the CPU 32 changes the content of the flag to“ON” (i.e. updates the device information). On the other hand, when thecontent of the flag is “ON”, the CPU 32 maintains the content of theflag as “ON” (i.e. maintains the device information). In S74, in thecase where the CPU 32 caused the device information including the devicename included in the Scan_Req signal to be stored anew in the list 40,the CPU 32 starts the count of the timer value (e.g. “T1” of FIG. 1)included in the device information. When S74 ends, the process proceedsto S76.

In S76, the CPU 32 changes the Wi-Fi I/F 20 and the NFC I/F 24 fromeither the OFF state or the Standby state to the ON state. Specifically,the CPU 32 supplies a high amount of power to the Wi-Fi I/F 20 and theNFC I/F 24. In the case where the Wi-Fi I/F 20 and the NFC I/F 24 arealready in the ON state, the CPU 32 maintains the Wi-Fi I/F 20 and theNFC I/F 24 in the ON state. When the Wi-Fi I/F 20 is changed to the ONstate, the CPU 32 also automatically shifts the operating state of theMFP 10 from a WFD device state to a G/O (abbreviation of Group Owner)state without performing a WFD G/O negotiation. When the operating stateof the MFP 10 shifts to the G/O state, the CPU 32 forms a wirelessnetwork that has the MFP 10 as the G/O (i.e. a WFD network). The CPU 32also generates a SSID (abbreviation of Service Set IDentifier) and apassword by randomly generating character strings. Hereinbelow, the SSIDand the password may be called “network information”. The networkinformation (i.e. the SSID and the password) is information used in theaforementioned WFD network.

Next, in S77, the CPU 32 causes the network information generated in S76to be stored in the memory 26 of the NFC I/F 24. When S77 ends, theprocess returns to S50 in FIG. 3.

In S80, the CPU 32 determines whether or not the received Scan_Reqsignal includes the distance information “Near”. The content of theprocess of S80 is the same as that of S72. In the case of YES in S80,the process proceeds to S82. In the case of NO in S80, the processproceeds to S90.

In S82, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S82 includes the device nameincluded in the received Scan_Req signal, the “Standby” flag, and thetimer value. Furthermore, at the stage of S82, when the content of theflag is other than “Standby” in the case where device informationincluding the same device name as the device name included in theScan_Req signal already exists in the list 40, the CPU 32 changes thecontent of the flag to “Standby” (i.e. updates the device information).When the content of the flag is “Standby”, the CPU 32 maintains thecontent of the flag as “Standby” (i.e. maintains the deviceinformation). In S82, in the case where the CPU 32 has caused the deviceinformation including the device name included in the Scan_Req signal tobe stored anew in the list 40, the CPU 32 starts the count of the timervalue (e.g. “T1” of FIG. 1) included in the device information. When S82ends, the process proceeds to S84.

In S84, the CPU 32 determines whether or not the Wi-Fi I/F 20 and theNFC I/F 24 are both in either the ON state or the OFF state. In the casewhere the Wi-Fi I/F 20 and the NFC I/F 24 are in either the ON state orthe OFF state, the CPU 32 makes the determination of YES in S84, andproceeds to S86. On the other hand, in the case where the Wi-Fi I/F 20and the NFC I/F 24 are both in the Standby state, the CPU 32 makes thedetermination of NO in S84, and returns to S50 of FIG. 3.

In S86, the CPU 32 determines whether or not device informationincluding the “ON” flag exists in the list 40. In the case where deviceinformation associated with the “ON” flag exists in the list 40, the CPU32 makes the determination of YES in S86, and returns to S50 of FIG. 3.On the other hand, in the case where only device information associatedwith either the “OFF” flag or the “Standby” flag exists in the list 40,the CPU 32 makes the determination of NO in S86, and proceeds to S88.

In S88, the CPU 32 changes the Wi-Fi I/F 20 and the NFC I/F 24 from theOFF state (or the ON state) to the Standby state. Specifically, the CPU32 supplies a lower amount of power to the Wi-Fi I/F 20 and the NFC I/F24 than in the ON state. When S88 ends, the process returns to S50 ofFIG. 3.

The respective processes of S90 to S96 are the same as the processes ofS54 to S60 of FIG. 3. As such, a detailed explanation will be omitted.In the case of NO in S92, in the case of YES in S94, or in the casewhere S96 ends, the CPU 32 returns to S50 of FIG. 3.

(List Administration Process; FIG. 5)

Next, a list administration process executed by the CPU 32 of the MFP 10will be explained by referring to FIG. 5. When the power supply to theMFP 10 is turned ON, the CPU 32 starts the process of FIG. 5 togetherwith the above-described process of FIGS. 3 and 4. However, the same asin the case of the process of FIGS. 3 and 4, the CPU 32 does not executethe process of FIG. 5 in the case where the Wi-Fi connection has alreadybeen established between the MFP 10 and the AP 110.

In S100, the CPU 32 determines whether or not the Scan_Req signal wasreceived from any of the portable terminals (e.g. portable terminal 50).Upon receiving the Scan_Req signal, the CPU 32 makes the determinationof YES in S100, and proceeds to S102. On the other hand, in the casewhere the Scan_Req signal is not received, the CPU 32 makes thedetermination of NO in S100, and proceeds to S108.

In S102, the CPU 32 determines whether or not the received Scan_Reqsignal includes the activation information. In the case where thereceived Scan_Req signal includes the activation information, the CPU 32makes the determination of YES in S102, and proceeds to S104. On theother hand, in the case where the received Scan_Req signal does notinclude the activation information, the CPU 32 makes the determinationof NO in S102, and proceeds to S108.

In S104, the CPU 32 determines whether or not device informationincluding the same device name as the device name included in thereceived Scan_Req signal exists in the list 40. In the case where deviceinformation (hereinafter called “specific device information”) includingthe same device name as the device name included in the Scan_Req signalalready exists in the list 40, the CPU 32 makes the determination of YESin S104, and proceeds to S106. On the other hand, in the case where thespecific device information does not exist in the list 40, the CPU 32makes the determination of NO in S104, skips S106, and returns to S100.

In S106, the CPU 32 resets the timer value (e.g. “T1” of FIG. 1)included in the specific device information. After resetting the timervalue included in the specific device information, the CPU 32 once againstarts the count of the timer value. When S106 ends, the process returnsto S100.

In S108, the CPU 32 determines whether or not the device informationexists in the list 40. In the case where even one piece of deviceinformation exists in the list 40, the CPU 32 makes the determination ofYES in S108, and proceeds to S110. On the other hand, in the case whereno device information exists in the list 40, the CPU 32 makes thedetermination of NO in S108, and returns to S100.

In S110, the CPU 32 determines whether or not any of one or more timervalues included in one or more pieces of device information that existin the list 40 are equal to or greater than a predetermined thresholdTH. In the case where device information that includes a timer valueequal to or greater than the predetermined threshold TH exists in thelist 40, the CPU 32 makes the determination of YES in S110, and proceedsto S112. On the other hand, in the case where device information thatincludes a timer value equal to or greater than the predeterminedthreshold TH does not exist in the list 40, the CPU 32 makes thedetermination of NO in S110, and returns to S100.

In S112, the CPU 32 deletes the device information including the timervalue that is equal to or greater than the predetermined threshold THfrom the list 40. When S112 ends, the process returns to S100.

(Summary of Contents of Flags Included in Device Information; FIG. 6)

The content of the flag included in the device information (i.e. any of“ON”, “Standby”, or “OFF”) when the CPU 32 causes the device informationto be stored in the list 40 (S54 of FIG. 3, S74 of FIGS. 4, S82, andS90) in the I/F controlling process of the present embodiment (refer toFIGS. 3 and 4) will be explained in summary form by referring to FIG. 6.As shown in FIG. 6, a flag having content that differs for eachcondition of the portable terminal is included in the deviceinformation.

[Condition 1] In the case where the Scan_Req signal includes theinstruction information (YES in S70 of FIG. 4) and includes the distanceinformation “Near” (YES in S72), the “ON” flag is included in the deviceinformation (S74).

[Condition 2] In the case where the Scan_Req signal includes theinstruction information (YES in S70 of FIG. 4), and includes thedistance information “Far” (NO in S72), the “Standby” flag is includedin the device information (S82).

[Condition 3] In the case where the Scan_Req signal includes theactivation information but not the instruction information (YES in S52of FIG. 3, NO in S70 of FIG. 4), and includes the distance information“Near” (YES in S80), the “Standby” flag is included in the deviceinformation (S82).

[Condition 4] In the case where the Scan_Req signal includes theactivation information but not the instruction information (YES in S52of FIG. 3, NO in S70 of FIG. 4), and includes the distance information“Far” (NO in S80), the “OFF” flag is included in the device information(S90).

[Condition 5] In the case where the Scan_Req signal does not include theactivation information (NO in S52 of FIG. 3), the “OFF” flag is includedin the device information regardless of the content of the distanceinformation (S54).

[Condition 6] Furthermore, in the case where the Scan_Req signal has notbeen received (i.e. “No response” in the drawing; NO in S50 of FIG. 3),the CPU 32 does not cause the device information to be stored in thelist 40.

(Specific Case; FIGS. 7 and 8)

Next, a specific case realized by the processes of FIGS. 2 to 5 will beexplained by referring to FIGS. 7 and 8. In FIGS. 7 and 8, thin linearrows, broken line arrows, and thick line arrows between the portableterminals 50 and 90 and the MFP 10 indicate BT communications, NFCcommunications, and Wi-Fi communications, respectively.

In the initial state of the present case, the MFP 10 has not establishedthe Wi-Fi connection with the AP 110. The power supply to the MFP 10 isON, and the BT I/F 22 is in the ON state, but both the Wi-Fi I/F 20 andthe NFC I/F 24 are in the OFF state. The MFP 10 repeatedly performs abroadcast transmission of the Advertise signal via the BT I/F 22 withinthe communication range of the BT I/F 22 (S10 and S12 of FIG. 2). In theinitial state, no device information is stored in the list 40 in thememory 34 of the MFP 10.

In A1, a print instruction for performing printing on the MFP 10 isinputted to the portable terminal 50 by the user of the portableterminal 50. The print instruction includes specifying of the targetdata to be printed. Furthermore, at the time point at which the printinstruction is inputted to the portable terminal 50, the applicationprogram 78 has already been activated on the portable terminal 50.Thereafter, the portable terminal 50 receives the Advertise signal fromthe MFP 10 at a location that is relatively far from the MFP 10 (i.e. ata location that is outside of the range 210 but within the communicationrange 200 of FIG. 2.). Upon receiving the Advertise signal from the MFP10, in T10, the portable terminal 50 sends the MFP 10 the Scan_Reqsignal. The Scan_Req signal in T10 includes the device name “N1”, thedistance information “Far”, the activation information, the instructioninformation, and the NFC Capability information.

Upon receiving the Scan_Req signal (T10) from the portable terminal 50,in T12, the MFP 10 causes the device information to be stored in thelist 40 (YES in S70, NO in S72, and S82 of FIG. 4). The deviceinformation stored in the list 40 at this occasion includes the devicename “N1” of the portable terminal 50, the “Standby” flag, and the timervalue “T1”. The MFP 10 starts the count of the timer value “T1”. Next,in T14, the MFP 10 changes the Wi-Fi I/F 20 and the NFC I/F 24 from theOFF state to the Standby state (S88 of FIG. 4).

Thereafter, in A2, an application activation instruction is inputted tothe portable terminal 90 by the user of the portable terminal 90. Theapplication program is activated in the portable terminal 90 inaccordance therewith. Furthermore, the function performing instruction(e.g. the print instruction) is not inputted to the portable terminal 90at this stage. Thereafter, the portable terminal 90 receives theAdvertise signal from the MFP 10 at a location relatively near the MFP10 (i.e. a location within the range 210 of FIG. 2). Upon receiving theAdvertise signal from the MFP 10, in T16, the portable terminal 90 sendsthe Scan_Req signal to the MFP 10. The Scan_Req signal in T16 includesthe device name “N2”, the distance information “Near”, the activationinformation, and the NFC Capability information.

Upon receiving the Scan_Req signal (T16) from the portable terminal 90,in T18, the MFP 10 causes the device information to be stored in thelist 40 (NO in S70, YES in S80, and S82 of FIG. 4). The deviceinformation stored in the list 40 at this time includes the device name“N2” of the portable terminal 90, the “Standby” flag, and the timervalue “T2”. The MFP 10 starts the count of the timer value “T2”. Next,in T20, the MFP 10 maintains the Wi-Fi I/F 20 and the NFC I/F 24 in theStandby state (NO in S84 of FIG. 4).

Thereafter, in A3, the user of the portable terminal 50 moves theportable terminal 50 to a location relatively near the MFP 10. Theportable terminal 50 receives the Advertise signal from the MFP 10 atthe location that is relatively near the MFP 10. Upon receiving theAdvertise signal from the MFP 10, in T22, the portable terminal 50 sendsthe Scan_Req signal to the MFP 10. The Scan_Req signal in T22 includesthe device name “N1”, the distance information “Near”, the activationinformation, the instruction information, and the NFC Capabilityinformation. The distance information changes from “Far” to “Near” inline with the portable terminal 50 having been moved to a locationrelatively near the MFP 10.

Upon receiving the Scan_Req signal (T22) from the portable terminal 50,in T24, the MFP 10 updates the device information in the list 40 (YES inS70, YES in S72, and S74 of FIG. 4). Specifically, the MFP 10 changesthe flag of the device information that includes the device name “N1”from “Standby” to “ON”. The MFP 10 also resets the timer value “T1”(S106 of FIG. 5). Next, in T26, the MFP 10 changes the Wi-Fi I/F 20 andthe NFC I/F 24 from the Standby state to the ON state (S76 of FIG. 4).Next, in T28, the MFP 10 automatically shifts the operating state of theMFP 10 from the WFD device state to the G/O state (S76). Then, in T29,the MFP 10 generates the network information (i.e. the SSID and thepassword), and causes the generated network information to be stored inthe memory 26 of the NFC I/F 24 (S77).

Thereafter, in A4, the user of the portable terminal 50 brings theportable terminal 50 near the MFP 10. When the distance between the NFCI/F 24 of the MFP 10 and the NFC I/F 64 of the portable terminal 50becomes less than the distance over which the NFC communication can beperformed (e.g. 10 cm), in T30, an NFC communication session isestablished between these I/Fs. In this case, the portable terminal 50uses the NFC communication session to receive the network informationstored in the memory 26 of the NFC I/F 24.

Thereafter, in T32, the portable terminal 50 uses the received networkinformation to establish the Wi-Fi connection with the MFP 10.Specifically, the portable terminal 50 participates as a client in theWi-Fi network (i.e. the WFD network) formed by the MFP 10, which is theG/O. Consequently, a Wi-Fi communication session is established betweenthe Wi-Fi I/F 20 of the MFP 10 and the Wi-Fi I/F 62 of the portableterminal 50. Thereafter, the portable terminal 50 uses the Wi-Ficommunication session to send the target data to be printed to the MFP10. The MFP 10 performs a printing of an image represented by the targetdata on the print performing unit 16.

The processes performed between the portable terminal 50 and the MFP 10in T30 and T32 are disclosed in detail in US Patent ApplicationPublication No. 2013/260682, and this document is incorporated byreference herein.

Thereafter, in A5, a terminate application instruction is inputted tothe portable terminal 50 by the user of the portable terminal 50. Theapplication program is terminated in the portable terminal 50 inaccordance therewith. Thereafter, the portable terminal 50 once againreceives the Advertise signal from the MFP 10 at a location relativelynear the MFP 10. Upon receiving the Advertise signal from the MFP 10, inT50 of FIG. 8, the portable terminal 50 sends the Scan_Req signal to theMFP 10. The Scan_Req signal in T50 includes the device name “N2”, thedistance information “Near”, and the NFC Capability information. Sincethe application program has ended, neither the activation informationnor the instruction information is included in the Scan_Req signal.

Upon receiving the Scan_Req signal (T50) from the portable terminal 50,in T52, the MFP 10 updates the device information in the list 40 (NO inS52, and S54 of FIG. 3). Specifically, the MFP 10 changes the flag ofthe device information including the device name “N1” from “ON” to“OFF”. Because the Scan_Req signal does not include the activationinformation, the MFP 10 does not reset the timer value “T1” (NO in S102of FIG. 5).

In the case where the Advertise signal is once again received from theMFP 10 at a location relatively near the MFP 10, in T53, the portableterminal 90 again sends the Scan_Req signal to the MFP 10. The Scan_Reqsignal in T53 includes the device name “N2”, the distance information“Near”, the activation information, and the NFC Capability informationthe same as in T16 of FIG. 7.

Upon receiving the Scan_Req signal (T53) from the portable terminal 90,in T54, the MFP 10 maintains the device information in the list 40 (NOin S70, YES in S80, and S82 of FIG. 4). Specifically, the MFP 10maintains the flag of the device information including the device name“N2” as “Standby”. The MFP 10 also resets the timer value “T2” (S106 ofFIG. 5). Next, in T55, the MFP 10 changes the Wi-Fi I/F 20 and the NFCI/F 24 from the ON state to the Standby state (YES in S84, NO in S86,and S88 of FIG. 4). Consequently, in T56, the MFP 10 changes theoperating state of the MFP 10 from the G/O state to the device state.

Thereafter, in the case where the Advertise signal is once againreceived from the MFP 10 at a location relatively near the MFP 10, inT58, the portable terminal 50 again sends the Scan_Req signal to the MFP10. The Scan_Req signal in T58 includes the device name “N2”, thedistance information “Near”, and the NFC Capability information the sameas in T50.

The MFP 10 receives the Scan_Req signal (T58) from the portable terminal50, but since the Scan_Req signal does not include the activationinformation, the MFP 10 does not reset the timer value “T1” (NO in S102of FIG. 5).

Thereafter, in T60, the MFP 10 determines that the timer value “T1” inthe list 40 is equal to or greater than the predetermined threshold TH(YES in S110 of FIG. 5). Next, in T62, the MFP 10 deletes the deviceinformation corresponding to the timer value “T1” (i.e. the deviceinformation including the device name “N1”) from the list 40 (S112 ofFIG. 5).

Thereafter, in A10, the user of the portable terminal 90 moves theportable terminal 90 outside the communication range of the BT I/F 22 ofthe MFP 10 (outside the communication range 200 of FIG. 2).Consequently, the portable terminal 90 is unable to receive theAdvertise signal from the MFP 10. Therefore, the portable terminal 90 nolonger sends the Scan_Req signal to the MFP 10.

Thereafter, in T64, the MFP 10 determines that the timer value “T2” inthe list 40 has reached a value equal to or greater than thepredetermined threshold TH (YES in S110 of FIG. 5). Next, in T66, theMFP 10 deletes the device information corresponding to the timer value“T2” (i.e. the device information including the device name “N2”) fromthe list 40 (S112 of FIG. 5). As a result of this, no more deviceinformation exists in the list 40. Therefore, in T68, the MFP 10 changesthe Wi-Fi I/F 20 and the NFC I/F 24 from the Standby state to the OFFstate (YES in S56, NO in S58, and S60 of FIG. 3).

Effects of the Present Embodiment

In the present embodiment, as shown in the example of FIGS. 7 and 8, theMFP 10 is able to set the Wi-Fi I/F 20 and the NFC I/F 24 to anappropriate state in accordance with the content of the informationincluded in the Scan_Req signal received from the portable terminal 50and so forth. Therefore, the MFP 10 is able to realize power savings bysetting the Wi-Fi I/F 20 and the NFC I/F 24 to the appropriate state inaccordance with the condition of the portable terminal 50 and so forth.

For example, in the case where the Scan_Req signal including thedistance information “Far”, the activation information, and theinstruction information is received from the portable terminal 50 etc.while the Wi-Fi I/F 20 and the NFC I/F 24 are in the OFF state, the MFP10 changes the Wi-Fi I/F 20 and the NFC I/F 24 from the OFF state to theStandby state (refer to T10 to T14 of FIG. 7, YES in S70, NO in S72, andS80 of FIG. 4). Also, in the case where the Scan_Req signal includingthe distance information “Near”, the activation information, and theinstruction information is received from the portable terminal 50 etc.while the Wi-Fi I/F 20 and the NFC I/F 24 are in the OFF state (or theStandby state), the MFP 10 changes the Wi-Fi I/F 20 and the NFC I/F 24from the OFF state (or the Standby state) to the ON state (refer to YESin S70, YES in S72, and S76 of FIG. 4). On the other hand, in the casewhere the Scan_Req signal that includes neither the activationinformation nor the instruction information is received from theportable terminal 50 etc. while the Wi-Fi I/F 20 and the NFC I/F 24 arein the OFF state (NO in S52 of FIG. 3), the MFP 10 maintains the Wi-FiI/F 20 and the NFC I/F 24 in the OFF state (NO in S56). Also, in thecase where the Scan_Req signal that includes the distance information“Near” and the activation information, but does not include theinstruction information is received from the portable terminal 50 etc.while the Wi-Fi I/F 20 and the NFC I/F 24 are in the Standby state (NOin S70, and YES in S80 of FIG. 4), or the case where the Scan_Req signalincluding the distance information “Far” and the instruction informationis received from the portable terminal 50 etc. while the Wi-Fi I/F 20and the NFC I/F 24 are in the Standby state (YES in S70, and NO in S72of FIG. 4), the MFP 10 maintains the Wi-Fi I/F 20 and the NFC I/F 24 inthe Standby state (NO in S84). In the case where the application program78 is activated in the portable terminal 50, there is a relatively highlikelihood of a communication of target data to be printed beingperformed thereafter between the MFP 10 and the portable terminal 50.Also, in the case where the print instruction has already been inputtedto the portable terminal 50, there is an even higher likelihood of acommunication of target data to be printed being performed thereafterbetween the MFP 10 and the portable terminal 50. Therefore, as describedhereinabove, in the present embodiment, the MFP 10 is able to set eachI/F to the appropriate state in accordance with whether or not theapplication program 78 is activated in the portable terminal 50, andwhether or not the function performing instruction has already beeninputted to the portable terminal 50.

Furthermore, as described hereinabove, in the case where the Scan_Reqsignal including the distance information “Far”, the activationinformation, and the instruction information is received from theportable terminal 50 etc. while the Wi-Fi I/F 20 and the NFC I/F 24 arein the OFF state, the MFP 10 changes the Wi-Fi I/F 20 and the NFC I/F 24from the OFF state to the Standby state (refer to T10 to T14 of FIG. 7,YES in S70, NO in S72, and S88 of FIG. 4). In addition, in the casewhere the Scan_Req signal including the distance information “Near”, theactivation information, and the instruction information is received fromthe portable terminal 50 etc. while the Wi-Fi I/F 20 and the NFC I/F 24are in the Standby state, the MFP 10 changes the Wi-Fi I/F 20 and theNFC I/F 24 from the Standby state to the ON state (refer to T22 to T26of FIG. 7, YES in S70, YES in S72, and S76 of FIG. 4). Normally, thereis a higher likelihood of a communication of target data being performedthereafter between the MFP 10 and the portable terminal 50 in the casewhere the MFP 10 and the portable terminal 50 and so forth arerelatively near one another than when the MPF 10 and the portableterminal 50 and so forth are relatively far from one another. That is,in the present embodiment, the MFP 10 is able to set each I/F to theappropriate state in accordance with whether or not the specific signalreceived while the Wi-Fi I/F 20 and the NFC I/F 24 are in the OFF state(or the Standby state) includes predetermined information, and whetheror not the MFP 10 and the portable terminal 50 are relatively near oneanother at this time.

For example, in the case where the Scan_Req signal that includes neitherthe activation information nor the instruction information is receivedfrom the portable terminal 50 and so forth while the Wi-Fi I/F 20 andthe NFC I/F 24 are in the ON state, the MFP 10 changes the Wi-Fi I/F 20and the NFC I/F 24 from the ON state to the OFF state (or the Standbystate) (refer to T50 to T55 of FIG. 8, NO in S52, and S60 of FIG. 3).Therefore, the MFP 10 is able to realize power savings by lowering thepower supplied to the each of I/Fs under conditions where there is arelatively low likelihood of the communication of target data beingperformed with the portable terminal 50.

(Corresponding Relationships)

The MFP 10, the portable terminals 50, 90, 100, and the AP 110,respectively, are examples of “a communication apparatus”, “a firstexternal apparatus” and “a second external apparatus”. The Wi-Fi I/F 20,the BT I/F 22, and the NFC I/F 24, respectively, are examples of “afirst interface”, “a second interface” and “a third interface”. The OFFstate of the Wi-Fi I/F 20 is an example of “a first stage”. The Standbystate and the ON state of the Wi-Fi I/F20 are both examples of “a secondstate”. The OFF state of the NFC I/F 24 is an example of “a thirdstate”. The Standby state and the ON state of the NFC I/F 24 are bothexamples of “a fourth state”. The Standby state of the Wi-Fi I/F 20 isalso an example of “a first state”. The Standby state of the NFC I/F 24is also an example of “a third state”. The Standby state of the Wi-FiI/F 20 is also an example of “a first type of state”. The ON state ofthe Wi-Fi I/F 20 is also an example of “a second type of state”. Theactivation information and the instruction information are examples of“predetermined information”. The Scan_Req signal is an example of “aspecific signal”. The Advertise signal is an example of “a predeterminedsignal”. The G/O state of the WFD is an example of “a parent state”.

S12 and S22 of FIG. 2 are examples of “receiving a specific signal”. S60of FIG. 3, and S76, S88, and S96 of FIG. 4 are examples of “changing astate” and “maintaining the state”. T30 and T32 of FIG. 7 are examplesof “performing a communication”. S76 of FIG. 4 is an example of“changing an operating state”. S77 is an example of the process executedfor “sending network information”. S10 and S20 of FIG. 2 are examples ofthe process executed for “sending repeatedly a predetermined signal”.

Second Embodiment

A second embodiment will be explained by focusing on the points ofdifference from the first embodiment. In the present embodiment, the NFCI/F 24 may or may not be provided in the MFP 10. Also, the NFC I/F 64may or may not be provided in the portable terminal 50. The Scan_Reqsignal that is sent to the MFP 10 from the portable terminal 50 etc. mayor may not include the NFC Capability information. Therefore, anexplanation as to whether or not the NFC Capability information isincluded in the Scan_Req signal in the present embodiment will beomitted hereinbelow (refer to FIGS. 11 and 12). Furthermore, in thepresent embodiment, the CPU 32 of the MFP 10 executes the listadministration process (refer to FIG. 5) the same as in the firstembodiment.

(I/F Controlling Process of MFP 10; FIGS. 9 and 10)

In the present embodiment, the content of the I/F controlling processexecuted by the CPU 32 of the MFP 10 differs from that of the firstembodiment. The I/F controlling process executed by the CPU 32 of theMFP 10 of the present embodiment will be explained below by referring toFIGS. 9 and 10. The CPU 32 starts the process of FIGS. 9 and 10 when thepower supply to the MFP 10 is turned ON. However, the CPU 32 does notexecute the process of FIGS. 9 and 10 in the case where the Wi-Ficonnection has been established between the MFP 10 and the AP 110 (referto FIG. 1) (i.e. the case where the MFP 10 already belongs as a stationto the Wi-Fi network formed by the AP 110). The CPU 32 maintains theWi-Fi I/F 20 and the NFC I/F 24 in the ON state while the Wi-Ficonnection is established between the MFP 10 and the AP 110.

In S150, the CPU 32 determines whether or not the Scan_Req signal hasbeen received from any of the portable terminals (e.g. portable terminal50). The CPU 32, upon receiving the Scan_Req signal, makes thedetermination of YES in S150, and proceeds to S152. On the other hand,in the case where the Scan_Req signal is not received, the CPU 32 makesthe determination of NO in S150, and proceeds to S156.

In S152, the CPU 32 determines whether or not the received Scan_Reqsignal includes the activation information. In the case where thereceived Scan_Req signal includes the activation information, the CPU 32makes the determination of YES in S152, and proceeds to S170 of FIG. 10.On the other hand, in the case where the received Scan_Req signal doesnot include the activation information, the CPU 32 makes thedetermination of NO in S152, and proceeds to S154.

In S154, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S154 includes the “OFF” flag.Since the content of the process of S154 is the same as that of S54 ofFIG. 3, a detailed explanation will be omitted. When S154 ends, theprocess proceeds to S156.

In S156, the CPU 32 determines whether or not the Wi-Fi I/F 20 is in theON state or the Standby state. In the case where the Wi-Fi I/F 20 is ineither the ON state or the Standby state, the CPU 32 makes thedetermination of YES in S156, and proceeds to S158. On the other hand,in the case where the Wi-Fi I/F 20 is in the OFF state, the CPU 32 makesthe determination of NO in S156, and returns to S150.

In S158, the CPU 32 determines whether or not device information thatincludes either the “ON” or “Standby” flag exists in the list 40. In thecase where even one piece of device information associated with eitherthe “ON” or “Standby” flag exists in the list 40, the CPU 32 makes thedetermination of YES in S158, and returns to S150. On the other hand, inthe case where only device information that is associated with the “OFF”flag exists in the list 40, or the case where no device informationexists in the list 40, the CPU 32 makes the determination of NO in S158,and proceeds to S160.

In S160, the CPU 32 changes the Wi-Fi I/F 20 from the ON state (or theStandby state) to the OFF state. When S160 ends, the process returns toS150.

In S170 of FIG. 10, the CPU 32 determines whether or not the Scan_Reqsignal received in the case of YES in S150 of FIG. 9 includes theinstruction information. In the case where the Scan_Req signal includesthe instruction information, the CPU 32 makes the determination of YESin S170, and proceeds to S174. On the other hand, in the case where theScan_Req signal does not include the instruction information, the CPU 32makes the determination of NO in S170, and proceeds to S182.

In S174, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S174 includes the “ON” flag.Since the content of the process of S174 is the same as that of S74 ofFIG. 4, a detailed explanation will be omitted. When S174 ends, theprocess proceeds to S176.

In S176, the CPU 32 changes the Wi-Fi I/F 20 from either the OFF stateor the Standby state to the ON state. When the state of the Wi-Fi I/F 20is changed to the ON state, the CPU 32 also automatically shifts theoperating state of the MFP 10 from the WFD device state to the G/Ostate. When the operating state of the MFP 10 shifts to the G/O state,the CPU 32 forms a wireless network that has the MFP 10 as the G/O (i.e.a WFD network). The CPU 32 also generates the network information (i.e.the SSID and the password).

Next, in S177, the CPU 32 performs a unicast transmission via the BT I/F22 of a Scan Response (hereinafter called “Scan_Res signal”) includingthe network information generated in S176 to the portable terminal,which is the source of the Scan_Req signal. That is, the Scan_Res signalis the response signal to the Scan_Req signal. When S177 ends, theprocess returns to S150 in FIG. 9.

In S182, the CPU 32 causes the device information to be stored in thelist 40. The device information stored in S182 includes the “Standby”flag. Since the content of the process of S182 is the same as that ofS82 of FIG. 4, a detailed explanation will be omitted. When S182 ends,the process proceeds to S184.

In S184, the CPU 32 determines whether or not the Wi-Fi I/F 20 is in theON state or the OFF state. In the case where the Wi-Fi I/F 20 is ineither the ON state or the OFF state, the CPU 32 makes the determinationof YES in S184, and proceeds to S186. On the other hand, in the casewhere the Wi-Fi I/F 20 is in the Standby state, the CPU 32 makes thedetermination of NO in S184, and returns to S150 of FIG. 9.

In S186, the CPU 32 determines whether or not device informationincluding the “ON” flag exists in the list 40. In the case where deviceinformation associated with the “ON” flag exists in the list 40, the CPU32 makes the determination of YES in S186, and returns to S150 of FIG.9. On the other hand, in the case where only device informationassociated with either the “OFF” flag or the “Standby” flag exists inthe list 40, the CPU 32 makes the determination of NO in S186, andproceeds to S188.

In S188, the CPU 32 changes the state of the Wi-Fi I/F 20 from the OFFstate (or the ON state) to the Standby state. When S188 ends, theprocess returns to S150 of FIG. 9.

(Summary of Contents of Flags Included in Device Information; FIG. 6)

The content of the flag included in the device information when the CPU32 causes the device information to be stored in the list 40 (S154 ofFIG. 9, and S174 and S182 of FIG. 10) in the I/F controlling process ofthe present embodiment (refer to FIGS. 9 and 10) will be explained insummary form by referring to FIG. 6. As shown in FIG. 6, in the presentembodiment as well, a flag having content that differs for eachcondition of the portable terminal is included in the deviceinformation.

[Condition 1] In the case where the Scan_Req signal includes theinstruction information (YES in S170 of FIG. 10), the “ON” flag isincluded in the device information regardless of whether the distanceinformation is “Near” or “Far” (S174).

[Condition 2] In the case where the Scan_Req signal includes theactivation information but does not include the instruction information(NO in S170 of FIG. 10), the “Standby” flag is included in the deviceinformation regardless of whether the distance information is “Near” or“Far” (S182).

[Condition 3] In the case where the Scan_Req signal does not include theactivation information (NO in S152 of FIG. 9), the “OFF” flag isincluded in the device information regardless of whether the distanceinformation is “Near” or “Far” (S154).

[Condition 4] Furthermore, in the case where the Scan_Req signal has notbeen received (i.e. “No response” in the table; NO in S150 of FIG. 9),the CPU 32 does not cause the device information to be stored in thelist 40.

(Specific Case; FIGS. 11 and 12)

Next, a specific case realized by the processes of FIGS. 2, 9, 10, and 5will be explained by referring to FIGS. 11 and 12.

In the initial state of the present case, the MFP 10 has not establishedthe Wi-Fi connection with the AP 110. The power supply to the MFP 10 isON and the BT I/F 22 is in the ON state, but the Wi-Fi I/F 20 is in theOFF state. The MFP 10 repeatedly performs a broadcast transmission ofthe Advertise signal via the BT I/F 22 within the communication range ofthe BT I/F 22 (S10 and S12 of FIG. 2). In the initial state, no deviceinformation is stored in the list 40 in the memory 34 of the MFP 10.

In A20, the application activation instruction is input to the portableterminal 50 by the user of the portable terminal 50. Consequently, theapplication program 78 is activated in the portable terminal 50. Theportable terminal 50 receives the Advertise signal from the MFP 10 at alocation that is relatively far from the MFP 10. Upon receiving theAdvertise signal from the MFP 10, in T100, the portable terminal 50sends the Scan_Req signal to the MFP 10. The Scan_Req signal in T100includes the device name “N1”, the distance information “Far”, and theactivation information.

Upon receiving the Scan_Req signal (T100) from the portable terminal 50,in T102, the MFP 10 causes the device information to be stored in thelist 40 (NO in S170, and S182 of FIG. 10). The device information atthis occasion includes the device name “N1” of the portable terminal 50,the “Standby” flag, and the timer value “T1”. The MFP 10 starts thecount of the timer value “T1”. Next, in T104, the MFP 10 changes thestate of the Wi-Fi I/F 20 from the OFF state to the Standby state (S188of FIG. 10).

Thereafter, in A22, the application activation instruction is inputtedto the portable terminal 90 by the user of the portable terminal 90. Theapplication program is activated in the portable terminal 90 inaccordance therewith. Thereafter, the portable terminal 90 receives theAdvertise signal from the MFP 10 at a location relatively near the MFP10. Upon receiving the Advertise signal from the MFP 10, in T106, theportable terminal 90 sends the Scan_Req signal to the MFP 10. TheScan_Req signal in T106 includes the device name “N2”, the distanceinformation “Near”, and the activation information.

Upon receiving the Scan_Req signal (T106) from the portable terminal 90,in T108, the MFP 10 causes the device information to be stored in thelist 40 (NO in S170, and S182 of FIG. 10). The device information atthis occasion includes the device name “N2” of the portable terminal 90,the “Standby” flag, and the timer value “T2”. The MFP 10 starts thecount of the timer value “T2”. Next, in T110, the MFP 10 maintains theWi-Fi I/F 20 in the Standby state (NO in S184 of FIG. 10).

Thereafter, in A24, the print instruction is inputted to the portableterminal 50 by the user of the portable terminal 50. In this situation,the portable terminal 50 receives the Advertise signal from the MFP 10at the location that is relatively far from the MFP 10. Upon receivingthe Advertise signal from the MFP 10, in T112 the portable terminal 50sends the Scan_Req signal to the MFP 10. The Scan_Req signal in T112includes the device name “N1”, the distance information “Far”, theactivation information, and the instruction information.

Upon receiving the Scan_Req signal (T112) from the portable terminal 50,in T114 the MFP 10 updates the device information in the list 40 (YES inS170, and S174 of FIG. 10). Specifically, the MFP 10 changes the flag ofthe device information including the device name “N1” from “Standby” to“ON”. The MFP 10 also resets the timer value “T1” (S106 of FIG. 5).Next, in T116, the MFP 10 changes the state of the Wi-Fi I/F 20 from theStandby state to the ON state (S176 of FIG. 10). Next, in T118, the MFP10 automatically shifts the operating state of the MFP 10 from the WFDdevice state to the G/O state (S176). Next, in T120, the MFP 10generates the network information (i.e. the SSID and the password), andsends the Scan_Res signal including the generated network information tothe portable terminal 50 (S177).

Thereafter, in T122, the portable terminal 50 uses the networkinformation received from the MFP 10 to establish the Wi-Fi connectionwith the MFP 10. Specifically, the portable terminal 50 participates asa client in the Wi-Fi network (i.e. the WFD network) formed by the MFP10, which is the G/O. Consequently, the Wi-Fi communication session isestablished between the Wi-Fi I/F 20 of the MFP 10 and the Wi-Fi I/F 62of the portable terminal 50. Thereafter, the portable terminal 50 usesthe Wi-Fi communication session to send the target data to be printed tothe MFP 10. The MFP 10 causes the print performing unit 16 to performthe printing of the image represented by the target data.

The processes performed between the portable terminal 50 and the MFP 10in T122 are also disclosed in detail in US Patent ApplicationPublication No. 2013/260682, and this document is incorporated byreference herein.

Thereafter, in A26, the application termination instruction is inputtedto the portable terminal 50 by the user of the portable terminal 50. Theapplication program is terminated in the portable terminal 50 inaccordance therewith. Thereafter, the portable terminal 50 once againreceives the Advertise signal from the MFP 10 at a location relativelyfar from the MFP 10. Upon receiving the Advertise signal from the MFP10, in T140 of FIG. 12, the portable terminal 50 sends the Scan_Reqsignal to the MFP 10. The Scan_Req signal in T140 includes the devicename “N1”, and the distance information “Far”.

Upon receiving the Scan_Req signal (T140) from the portable terminal 50,in T142 the MFP 10 updates the device information in the list 40 (NO inS152, and S154 of FIG. 9). Specifically, the MFP 10 changes the flag ofthe device information including the device name “N1” from “ON” to“OFF”. Because the Scan_Req signal does not include the activationinformation, the MFP 10 does not reset the timer value “T1” (NO in S102of FIG. 5).

Upon once again receiving the Advertise signal from the MFP 10 at alocation relatively near the MFP 10, in T143, the portable terminal 90again sends the Scan_Req signal to the MFP 10. The Scan_Req signal inT143 includes the device name “N2”, the distance information “Near”, andthe activation information the same as in T106 of FIG. 11.

Upon receiving the Scan_Req signal (T143) from the portable terminal 90,in T144 the MFP 10 maintains the device information in the list 40 (NOin S170, and S182 of FIG. 10). Specifically, the MFP 10 maintains theflag of the device information including the device name “N2” as“Standby”. The MFP 10 also resets the timer value “T2” (S106 of FIG. 5).Next, in T145 the MFP 10 changes the state of the Wi-Fi I/F 20 from theON state to the Standby state (S188 of FIG. 10). Consequently, in T146,the MFP 10 changes the operating state of the MFP 10 from the G/O stateto the device state.

Upon once again receiving the Advertise signal from the MFP 10 at alocation relatively far from the MFP 10, in T148, the portable terminal50 again sends the Scan_Req signal to the MFP 10. The Scan_Req signal inT148 includes the device name “N1” and the distance information “Far”the same as in T140.

The MFP 10 receives the Scan_Req signal (T148) from the portableterminal 50, but since the Scan_Req signal does not include theactivation information, the MFP 10 does not reset the timer value “T1”(NO in S102 of FIG. 5).

Thereafter, in T150, the MFP 10 determines that the timer value “T1” inthe list 40 is equal to or greater than a predetermined threshold TH(YES in S110 of FIG. 5). Next, in T152 the MFP 10 deletes the deviceinformation corresponding to the timer value “T1” (i.e. the deviceinformation including the device name “N1”) from the list 40 (S112 ofFIG. 5).

Thereafter, in A30, the user of the portable terminal 90 moves theportable terminal 90 outside the communication range of the BT I/F 22 ofthe MFP 10 (outside the communication range 200 of FIG. 2).Consequently, the portable terminal 90 is unable to receive theAdvertise signal from the MFP 10. Therefore, the portable terminal 90 nolonger sends the Scan_Req signal to the MFP 10.

Thereafter, in T156, the MFP 10 determines that the timer value “T2” inthe list 40 is equal to or greater than the predetermined threshold TH(YES in S110 of FIG. 5). Next, in T158 the MFP 10 deletes the deviceinformation corresponding to the timer value “T2” (i.e. the deviceinformation including the device name “N2”) from the list 40 (S112 ofFIG. 5). As a result of this, device information no longer exists in thelist 40. Therefore, in T160 the MFP 10 changes the state of the Wi-FiI/F 20 from the Standby state to the OFF state (YES in S156, NO in S158,and S160 of FIG. 9).

Effects of Present Embodiment

In the present embodiment as well, as exemplified in FIG. 9 and FIG. 10the MFP 10 is also able to set the Wi-Fi I/F 20 to the appropriate statein accordance with the content of the information included in theScan_Req signal received from the portable terminal 50 etc. Therefore,the MFP 10 is able to realize power savings by setting the Wi-Fi I/F 20to the appropriate state in accordance with the condition of theportable terminal 50 etc.

(Corresponding Relationships)

S160 of FIGS. 9 and S176 and S188 of FIG. 10 are examples of “changing astate” and “maintaining the state”. T122 of FIG. 11 is an example of“performing a communication”. S176 of FIG. 10 is an example of “changingan operating state”. S177 is an example of “sending networkinformation”.

Specific examples of the present techniques have been describedhereinabove, but these specific examples are merely illustrative, and donot limit the scope of the claims. The technical scope described in theclaims includes various modifications and changes to the specificexamples illustrated hereinabove. Modifications of the embodimentsdescribed hereinabove will be recited below.

(Modification 1) In the first embodiment described hereinabove, the CPU32 of the MFP 10 switches the state of the Wi-Fi I/F 20 and the NFC I/F24 in accordance with the content of the information included in theScan_Req signal received from the portable terminal 50 and so forth. Notlimited to this, and the CPU 32 of the MFP 10 may be configured toswitch only the state of the NFC I/F 24 in accordance with the contentof the information included in the Scan_Req signal received from theportable terminal 50 and so forth. In this modification, the Wi-Fi I/F20 may normally be set to the ON state. In this modification, the CPU 32may send the network information via the NFC I/F 24 the same as in thefirst embodiment described hereinabove. In this modification, in thecase where the state of the NFC I/F 24 is changed to the ON state, theCPU 32 may cause the memory 26 of the NFC I/F 24 to store informationrequired for user authentication that uses the NFC communication. Inthis modification, the CPU 32 may receive the information required forexecuting the user authentication on the MFP 10 from the portableterminal 50 and so forth or a card via the NFC I/F 24. In thismodification, the NFC I/F 24 is an example of “a first interface”.

(Modification 2) In the embodiments described hereinabove, the CPU 32 ofthe MFP 10 repeatedly sends the Advertise signal via the BT I/F 22. Notlimited to this, and the portable terminal 50 etc. may each repeatedlysend the Advertise signal to the exterior. In that case, the CPU 32 ofthe MFP 10 may receive the Advertise signal from the portable terminal50 and so forth via the BT I/F 22. In this case, the Advertise signalmay include the device name, the activation information, the instructioninformation, and the NFC Capability information. Also, based on theintensity of the radio wave at the time the Advertise signal isreceived, the CPU 32 may make the determination as to whether thedistance between the MFP 10 and the portable terminal 50 and so forth isrelatively near (i.e. distance information “Near”) or relatively far(i.e. distance information “Far”). Thereafter, the CPU 32 may executethe processes (refer to FIGS. 2 to 5, FIG. 9, and FIG. 10) the same asin the embodiments described hereinabove. In this modification, theAdvertise signal sent by the portable terminal 50 and so forth is anexample of “a specific signal”.

(Modification 3) In the first embodiment described hereinabove, the CPU32 of the MFP 10 causes the network information (i.e. the SSID and thepassword) to be stored in the memory 26 of the NFC I/F 24 after changingthe operating state of the MFP 10 to the G/O state (S76 and S77 of FIG.4). Also, in the second embodiment, the CPU 32 sends the Scan_Res signalincluding the network information (i.e. the SSID and the password) tothe portable terminal after changing the operating state of the MFP 10to the G/O state (S176 and S177 of FIG. 10). Regarding this point, theaforementioned network information may include only the SSID, and neednot include the password. In this case, the password may be the valuealready known to the user via another method. In this modification, theSSID is also an example of “network information”.

(Modification 4) In the embodiments described hereinabove, it wasexplained that the Standby state of the Wi-Fi I/F 20 (or the NFC I/F 24)is the state in which it is possible to receive the radio wave via theWi-Fi I/F 20 (or the NFC I/F 24), but is not possible to perform theWi-Fi communication. Not limited to this, and the Standby state of theWi-Fi I/F 20 (or the NFC I/F 24) may also be described as the state inwhich power is supplied to the Wi-Fi I/F 20 (or the NFC I/F 24), but itis not possible to receive the radio wave via the Wi-Fi I/F 20 (or theNFC I/F 24). In the case of this modification, the Standby state of theWi-Fi I/F 20 and the Standby state of the NFC I/F 24, respectively, areexamples of “a first state” and “a third state”.

(Modification 5) The BT I/F 22 of the MFP 10 may be provided with a CPUand a memory. The memory of the BT I/F 22 may store a program. The CPUof the BT I/F 22 may be configured to be able to perform the operationsof the embodiments described hereinabove in accordance with the programin the memory of the BT I/F 22 without receiving an instruction from theCPU 32 in the controller 30. Also, the NFC I/F 24 of the MFP 10 may beprovided with a CPU. The memory 26 of the NFC I/F 24 may store aprogram. The CPU of the NFC I/F 24 may be configured to be able toperform the operations of the embodiments described hereinabove inaccordance with the program in the memory 26 of the NFC I/F 24 withoutreceiving an instruction from the CPU 32 in the controller 30. Also, theNFC I/F 24 of the MFP 10 need not be provided with a CPU and the memory26. The NFC I/F 24 may be able to perform the operations of theembodiments described hereinabove by receiving an instruction from theCPU 32 in the controller 30. Generally speaking, the “firstcommunication apparatus” may be provided with two or more processors(e.g. the CPU 32 in the controller 30 of the MFP 10 and the CPU in theBT I/F 22) and two or more memories (e.g. the memory 34 in thecontroller 30 and the memory in the BT I/F 22), and the processors mayexecute processes in accordance with the programs stored in thememories.

(Modification 6) In the embodiments described hereinabove, the casewhere the print instruction is inputted to the portable terminal 50 wasexplained. Not limited to this, and another function performinginstruction for causing the MFP 10 to perform another function, such asa scan instruction, may be inputted to the portable terminal 50. Forexample, in the case where a scan instruction is inputted to theportable terminal 50, in T32 of FIG. 7 and T122 of FIG. 11, scan imagedata generated by the scan performing unit 18 performing a scan may becommunicated between the MFP 10 and the portable terminal 50 instead ofthe target data to be printed. In this modification, the scan functionis an example of “a specific function”. The scan image data is anexample of “target data”.

(Modification 7) In the embodiments described hereinabove, in the casewhere the timer value included in the device information is equal to orgreater than the predetermined threshold TH, the CPU 32 of the MFP 10deletes the device information including the timer value from the list40 (S112 of FIG. 5). The criterion for deleting the device informationin the list 40 is not limited to the timer value, and an arbitrarycriterion may be used. For example, the CPU 32 may be configured todelete the device information in the case where the Scan_Req signal isnot received in response to a predetermined number of Advertise signals.

(Modification 8) In the second embodiment described hereinabove, thenetwork information is included in the Scan_Res signal sent to theportable terminal 50 by the MFP 10 (refer to T120 of FIG. 11). Notlimited to this, and the network information may be included in theAdvertise signal that the MFP 10 repeatedly broadcasts via the BT I/F 22within the communication range of the BT I/F 22.

(Modification 9) In the embodiments described hereinabove, the processesof FIGS. 2 to 5, FIG. 9 and FIG. 10 are realized using software (i.e. aprogram), but at least one of the processes of FIGS. 2 to 5, FIG. 9 andFIG. 10 may be realized using hardware, such as a logic circuit.

What is claimed is:
 1. A communication apparatus comprising: a firstinterface configured to perform a wireless communication in accordancewith a first communication scheme, and to be set in one state among aplurality of states including a first state and a second state that hashigher power consumption than that of the first state; a secondinterface configured to perform a wireless communication in accordancewith a second communication scheme different from the firstcommunication scheme, the second interface having lower powerconsumption than that of the first interface being in the second state;a processor; and a memory storing computer-readable instructionstherein, the computer-readable instructions, when executed by theprocessor, causing the communication apparatus to perform: receiving aspecific signal via the second interface from a first externalapparatus; changing a state of the first interface from the first stateto the second state, in a case where the specific signal includingpredetermined information is received via the second interface while thestate of the first interface is the first state; maintaining the stateof the first interface in the first state, in a case where the specificsignal not including the predetermined information is received while thestate of the first interface is the first state; performing acommunication of target data with the first external apparatus via thefirst interface being in the second state, after the state of the firstinterface has been changed to the second state; changing the state ofthe first interface from the second state to the first state, in a casewhere the specific signal not including the predetermined information isreceived while the state of the first interface is the second state; andmaintaining the state of the first interface in the second state, in acase where the specific signal including the predetermined informationis received while the state of the first interface is the second state.2. The communication apparatus as in claim 1, wherein the predeterminedinformation includes information indicating that an application programfor causing the communication apparatus to perform a specific functionhas been activated in the first external apparatus, and the performingof the communication of target data is executed as the specific functionin the case where the specific signal including the predeterminedinformation is received.
 3. The communication apparatus as in claim 2,wherein the predetermined information further includes informationindicating that an instruction for causing the communication apparatusto perform the specific function has been inputted in the first externalapparatus.
 4. The communication apparatus as in claim 2, wherein thecommunication apparatus further comprises: a print performing unitconfigured to perform a printing of an image represented by the receivedtarget data, the specific function includes a print function, and theperforming of the communication includes receiving the target data fromthe first external apparatus.
 5. The communication apparatus as in claim1, wherein the second state includes a first type of state and a secondtype of state that has higher power consumption than that of the firsttype of state, both the first type of state and the second type of statehaving higher power consumption than the first interface of the firststate, and the changing of the state from the first state to the secondstate includes: changing the state of the first interface from the firststate to the first type of state, in a case where the specific signalincluding the predetermined information is received while the state ofthe first interface is the first state, and a distance between thecommunication apparatus and the first external apparatus is farther thana threshold; and changing the state of the first interface from thefirst type of state to the second type of state, in a case where thespecific signal including the predetermined information is receivedwhile the state of the first interface is the first type of state, andthe distance between the communication apparatus and the first externalapparatus is nearer than the threshold.
 6. The communication apparatusas in claim 1, wherein the first communication scheme is a Wi-Fi scheme,and the second communication scheme is a Bluetooth (registeredtrademark) scheme.
 7. The communication apparatus as in claim 1, furthercomprising a third interface configured to perform a wirelesscommunication in accordance with a third communication scheme differentfrom the first communication scheme and the second communication scheme,and to be set in one state among a plurality of states including a thirdstate and a fourth state that has higher power consumption than that ofthe third state, wherein the computer-readable instructions, whenexecuted by the processor, cause the communication apparatus to furtherperform: changing the state of the third interface from the third stateto the fourth state, in a case where the specific signal including thepredetermined information is received while the state of the thirdinterface is the third state, and maintaining the state of the thirdinterface in the third state, in a case where the specific signal notincluding the predetermined information is received while the state ofthe third interface is the third state.
 8. The communication apparatusas in claim 7, wherein the predetermined information includesinformation indicating that the first external apparatus is capable ofperforming a wireless communication in accordance with the thirdcommunication scheme.
 9. The communication apparatus as in claim 7,wherein the first communication scheme is a Wi-Fi scheme, the secondcommunication scheme is a Bluetooth scheme (registered trademark), andthe third communication scheme is an NFC (an abbreviation of Near FieldCommunication) scheme.
 10. The communication apparatus as in claim 1,wherein the computer-readable instructions, when executed by theprocessor, cause the communication apparatus to further perform:maintaining the state of the first interface in the second stateregardless of whether or not the specific signal includes thepredetermined information, in a case where the state of the firstinterface is in the second state and the specific signal is receivedwhile a wireless connection with a second external apparatus isestablished via the first interface, the second external apparatus beingdifferent from the first external apparatus.
 11. The communicationapparatus as in claim 1, wherein the first communication scheme is anNFC (an abbreviation of Near Field Communication) scheme, and the secondcommunication scheme is a Bluetooth scheme (registered trademark). 12.The communication apparatus as in claim 1, wherein the computer-readableinstructions, when executed by the processor, cause the communicationapparatus to further perform: sending repeatedly, via the secondinterface, a predetermined signal including identification informationof the communication apparatus to an exterior, and the specific signalis sent from the first external apparatus to the communication apparatusin response to the first external apparatus receiving the predeterminedsignal from the communication apparatus.
 13. The communication apparatusas in claim 1, wherein the first state includes a state where electricpower is not provided to the first interface.
 14. The communicationapparatus as in claim 1, wherein the first state includes a stateincapable of receiving radio waves via the first interface, and thesecond state includes a state capable of receiving radio waves via thefirst interface.
 15. A non-transitory computer-readable medium storingcomputer-readable instructions for a communication apparatus, whereinthe communication apparatus comprises: a first interface configured toperform a wireless communication in accordance with a firstcommunication scheme, and to be set in one state among a plurality ofstates including a first state and a second state, the second statehaving higher power consumption than that of the first state; a secondinterface configured to perform a wireless communication in accordancewith a second communication scheme different from the firstcommunication scheme, the second interface having lower powerconsumption than that of the first interface being in the second state;and a processor; and the computer-readable instructions, when executedby the processor, causing the communication apparatus to perform:receiving a specific signal via the second interface from a firstexternal apparatus; changing a state of the first interface from thefirst state to the second state, in a case where the specific signalincluding predetermined information is received via the second interfacewhile the state of the first interface is the first state; maintainingthe state of the first interface in the first state, in a case where thespecific signal not including the predetermined information is receivedwhile the state of the first interface is the first state; performing acommunication of target data with the first external apparatus via thefirst interface being in the second state, after the state of the firstinterface has been changed to the second state; changing the state ofthe first interface from the second state to the first state, in a casewhere the specific signal not including the predetermined information isreceived while the state of the first interface is the second state; andmaintaining the state of the first interface in the second state, in acase where the specific signal including the predetermined informationis received while the state of the first interface is the second state.16. A non-transitory computer-readable medium storing an applicationprogram including computer-readable instructions for an externalapparatus, wherein the external apparatus comprises: a first interfaceconfigured to perform a wireless communication in accordance with afirst communication scheme; a second interface configured to perform awireless communication in accordance with a second communication schemedifferent from the first communication scheme, the second interfacehaving lower power consumption than that of the first interface, thesecond interface sending a specific signal not including predeterminedinformation to a communication apparatus in a case where the applicationprogram has not been activated in the external apparatus; and aprocessor; and the computer-readable instructions, when executed by theprocessor, causing the external apparatus to perform: sending thespecific signal including the predetermined information to thecommunication apparatus via the second interface in a case where theapplication program has been activated in the external apparatus;receiving, via the second interface, network information to be used in awireless network from the communication apparatus, the wireless networkbeing a network for performing a wireless communication via the firstinterface; belonging to the wireless network in response to receivingthe network information; and performing a wireless communication oftarget data with the communication apparatus via the first interface byusing the wireless network.
 17. The non-transitory computer-readablemedium as in claim 16, wherein the specific signal is a signal forchanging a state of an interface of the communication apparatus from afirst state to a second state that has higher power consumption thanthat of the first state.
 18. The non-transitory computer-readable mediumas in claim 17, wherein the network information is received in responseto sending the specific signal.
 19. The non-transitory computer-readablemedium as in claim 17, wherein the second interface sends the specificsignal not including the predetermined information by changing a stateof the external apparatus from a state where the application program isactivated to a state where the application program is not activatedafter performing the wireless communication of the target data.
 20. Anon-transitory computer-readable medium storing computer-readableinstructions for an external apparatus, wherein the external apparatuscomprises: a first interface configured to perform a wirelesscommunication in accordance with a first communication scheme; a secondinterface configured to perform a wireless communication in accordancewith a second communication scheme different from the firstcommunication scheme, the second interface having lower powerconsumption than that of the first interface; and a processor; and thecomputer-readable instructions, when executed by the processor, causingthe external apparatus to perform: sending a specific signal includingpredetermined information to a communication apparatus via the secondinterface in a case where an instruction for causing the communicationapparatus to perform a specific function has been inputted in theexternal apparatus; receiving, via the second interface, networkinformation to be used in a wireless network from the communicationapparatus, the wireless network being a network for performing awireless communication via the first interface; belonging to thewireless network in response to receiving the network information;performing a wireless communication of target data with thecommunication apparatus via the first interface by using the wirelessnetwork; and sending the specific signal not including the predeterminedinformation to the communication apparatus via the second interfaceafter performing the wireless communication of the target data.
 21. Thenon-transitory computer-readable medium as in claim 20, wherein thespecific signal is a signal for changing a state of an interface of thecommunication apparatus from a first state to a second state that hashigher power consumption than that of the first state.
 22. Thenon-transitory computer-readable medium as in claim 20, wherein thenetwork information is received in response to sending the specificsignal.